import request from '@/utils/request'

// 更新菜单
export function updateMenu(obj) {
  return request({
    url: '/sys/updateMenu',
    method: 'put',
    data: obj
  })
}

// 添加菜单
export function addMenu(obj) {
  return request({
    url: '/sys/addMenu',
    method: 'post',
    data: obj
  })
}

// 获取菜单树
export function getMenuTree(obj) {
  return request({
    url: '/sys/getMenuTree',
    method: 'get',
    params: obj
  })
}

// 获取菜单
export function getMenus(obj) {
  return request({
    url: '/sys/getMenus',
    method: 'get',
    params: obj
  })
}

// 删除菜单
export function deleteMenu(obj) {
  return request({
    url: '/sys/deleteMenu',
    method: 'delete',
    params: obj
  })
}